chore(promql_utilities): delete five dead types and the logics.rs planner shim - #396
Merged
Merged
Conversation
…nner shim Stage 2 of the promql_utilities/sketch_algebra retirement plan. Every item deleted here had zero non-test callers anywhere in the workspace (control_plane, data_plane, asap_types) -- confirmed by a full-repo call-site audit, not just a local grep. - QueryPatternType, PromQLFunction, AggregationOperator: defined, tested, never imported anywhere else. PromQLFunction duplicated work that already happened twice over independently (ASAPController's frontend-promql parses the same function names at L1; data_plane's own backend_storage_routing.rs built its own QueryShape matcher for the same strings). - QueryTreatmentType: its one live dependent was a cross-check test in asap_types::capability_matching, superseded by that crate's own AccuracyTarget (Exact/Approximate) which already covers the need. - logics.rs (map_statistic_to_precompute_operator, does_precompute_operator_support_subpopulations, get_is_collapsable): dead in production. The docstring's claimed caller, IntermediateAggConfig, doesn't exist anywhere in the Rust codebase -- a retired Python-planner relic. Deleted the whole file; asap_types::capability_matching:: compatible_agg_types is now the sole source of truth for (Statistic, AggregationType) compatibility, no second table to keep in agreement with. - Rewrote/removed the capability_canonical_map_agreement test (its entire premise -- two independently-maintained tables that must agree -- no longer applies now that only one table exists) and fixed the stale doc-comment cross-references to the deleted function. No behavior change anywhere. cargo build --workspace clean; cargo test -p promql_utilities -p asap_types -p control_plane all green (828 passed, 1 known pre-existing unrelated failure). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 2 of the promql_utilities/sketch_algebra retirement plan. Every item deleted here had zero non-test callers anywhere in the workspace (control_plane, data_plane, asap_types) — confirmed by a full-repo call-site audit, not just a local grep.
QueryPatternType,PromQLFunction,AggregationOperator: defined, tested, never imported anywhere else.PromQLFunctionduplicated work that already happened twice over independently (ASAPController'sfrontend-promqlparses the same function names at L1; data_plane's ownbackend_storage_routing.rsbuilt its ownQueryShapematcher for the same strings).QueryTreatmentType: its one live dependent was a cross-check test inasap_types::capability_matching, superseded by that crate's ownAccuracyTarget(Exact/Approximate) which already covers the need.logics.rs(map_statistic_to_precompute_operator,does_precompute_operator_support_subpopulations,get_is_collapsable): dead in production. The docstring's claimed caller,IntermediateAggConfig, doesn't exist anywhere in the Rust codebase — a retired Python-planner relic. Deleted the whole file;asap_types::capability_matching::compatible_agg_typesis now the sole source of truth for(Statistic, AggregationType)compatibility, no second table to keep in agreement with.capability_canonical_map_agreementtest (its entire premise — two independently-maintained tables that must agree — no longer applies now that only one table exists) and fixed the stale doc-comment cross-references to the deleted function.No behavior change anywhere.
Test plan
cargo build --workspace— cleancargo test -p promql_utilities -p asap_types -p control_plane— all green (828 passed, 1 known pre-existing unrelated failure:invalid_sketch_type_override_falls_back_to_default)cargo build -p data_plane— clean🤖 Generated with Claude Code